﻿using Loki.Engine;
using Luna.Model.Accounting;
using Luna.Model.Configuration;
using Luna.Model.Directory;
using Luna.Model.Project;
using Luna.Model.Security;

namespace Luna.Model
{
    public class LunaModel : ServiceModel
    {
        public ISecurityService Security
        {
            get { return GetService<ISecurityService>(); }
            set { RegisterService<ISecurityService>(value); }
        }

        public IConfigurationService Configuration
        {
            get { return GetService<IConfigurationService>(); }
            set { RegisterService<IConfigurationService>(value); }
        }

        public IInstallService Install
        {
            get { return GetService<IInstallService>(); }
            set { RegisterService<IInstallService>(value); }
        }

        public IAccountingService Accounting
        {
            get { return GetService<IAccountingService>(); }
            set { RegisterService<IAccountingService>(value); }
        }

        public IProjectService Project
        {
            get { return GetService<IProjectService>(); }
            set { RegisterService<IProjectService>(value); }
        }

        /// <summary>
        /// Gets or sets the directory service.
        /// </summary>
        public IDirectoryService Directory
        {
            get { return GetService<IDirectoryService>(); }
            set { RegisterService<IDirectoryService>(value); }
        }

        public IUser CurrentUser
        {
            get;
            set;
        }
    }
}
